import pojo.LinearList;
import pojo.SinglyLinkedList;
import pojo.Student;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        LinearList<Student> list = new SinglyLinkedList<>();
        System.out.print("添加：");
        System.out.println(new Student(1,"张三",90.0));
        list.insert(new Student(1,"张三",90.0));

        System.out.print("打印结果：");
        list.printList();
        System.out.println();

        System.out.print("插入：");
        System.out.println("节点"+1+"号 "+new Student(2,"李四",80.0));
        list.insert(1,new Student(2,"李四",80.0));

        System.out.print("查找学生所在节点：");
        System.out.print(new Student(2,"李四",80.0)+" ");
        System.out.println("学生所在节点："+list.indexOf(new Student(2,"李四",80.0)));

        System.out.print("打印结果：");
        list.printList();

        System.out.println();
        System.out.println("移除："+0+"号节点");
        list.remove(0);

        System.out.print("打印结果：");
        list.printList();
    }
}